function media_stop(sender, args) {

    sender.findName("media").stop();
}

function media_pause(sender, args) {
    
    sender.findName("media").pause();
}

function media_begin(sender, args) {
    
    sender.findName("media").play();
}


// emphasize function canvas_loaded(sender, args)
function canvas_loaded(sender, args)
{
  
    var control = sender.getHost();
    control.fullScreenChanged = "javascript:onFullScreenChanged";
    

}

// emphasize function toggle_fullScreen(sender, args)
function toggle_fullScreen(sender, args)
{
    var wpfeControl = sender.getHost();
    wpfeControl.fullScreen = !wpfeControl.fullScreen;  
   
}

// emphasize function onFullScreenChanged(sender, args)
function onFullScreenChanged(sender, args)
{


    var wpfeControl = sender.getHost();
    var buttonPanel = sender.findName("buttonPanel");
    if (wpfeControl.FullScreen == true)
    {
      buttonPanel.opacity = 0;
    }
    else 
    {
      buttonPanel.opacity = 1;
    }
    
    var mediaPlayer = sender.findName("media");
    mediaPlayer.width = wpfeControl.actualWidth;
    mediaPlayer.height = wpfeControl.actualHeight;

}



